<%@page import="models.Inlink"%>
<%@page import="controller.Utils"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="models.Domain"%>
<%@page import="com.googlecode.objectify.Query"%>
<%
	Inlink list = (Inlink) request.getAttribute("list");
	String domain = (String) request.getAttribute("domain");
	int pages = Integer.parseInt((String) request.getAttribute("page"));
	NumberFormat nf = NumberFormat.getInstance();
	String url = "in-link/" + domain;

	String title = "Page - " + pages + " | In link " + domain;
	String description = "In link " + domain + " Page - " + pages
			+ ".The domain has the out link " + domain
			+ " on showsiteinfo";
	String keyword = domain + "," + "link,in-link,check link";
%>

<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="<%=title%>"/>
	<jsp:param name="description" value="<%=description%>"/>
	<jsp:param name="keywords" value="<%=keyword%>"/>
</jsp:include>
        
<div class="bd">
	<div class="l">
		<div class="rib">
			<h1>
				<a href="/sites/<%=domain%>" class="white"><%=domain%></a>
			</h1>
		</div>
		<div class="cont">
			<%
				int count = 0;
				if (list != null && list.getInLink() != null) {
					count = list.getInLink().size();
				}
			%>
			<p>
				In-Links : Another name for backlinks, or links into a domain from
				external sources.These are in-links list of <i><%=domain%></i> ( <strong><%=count%></strong>
				)
			</p>
			
			<div id="featuredservice">
        		 <table class="exp">
        		 	<%
        		 	int start = (pages-1)*30;
					int end = (pages-1)*30 + 30;
					int k=0;
        		 		if(list!=null&&list.getInLink()!=null)
        		 		{
        		 	%>
        		 	<tr>
        		 		<th>Domain</th>
        		 		<th></th>
        		 	</tr>
        		 	<%
        		 			if(end > list.getInLink().size())
							{
								end = list.getInLink().size();
							}
        		 			for(int i=start;i < end;i++)
							{
        		 				k++;
        		 	%>
        		 		<tr>
	        		 		<td><a href="/sites/<%=Utils.fomatDomain(list.getInLink().get(i)) %>"><%=Utils.fomatDomain(list.getInLink().get(i)) %></a></td>
	        		 		<td class="right"><a href="/check-link/<%=Utils.fomatDomain(list.getInLink().get(i)) %>" rel="nofollow">Check link</a></td>
	        		 	</tr>
        		 	<%
							}
        		 		} else {
        		 	%>
        		 		<tr><td>
        		 			Currently, we don't find in-links from your site. You can use tools is listed below to find more and more information about your site.
        		 			<br/><br/>
        		 			<a href="/network-tool">Network tool</a> | <a href="/pagerank">Check pagerank</a> | <a href="/lookup-ip">Lookup ip</a>
        		 		</td></tr>
        		 	<%
        		 		}
        		 	%>
        		 </table>    
                     </div>
                      <div class="clear"></div>
                     <ul>
       		 	<li class="paginate">
					<jsp:include page="paginate.jsp">
						<jsp:param name="cur_page" value="<%=pages %>"/>
						<jsp:param name="url" value="<%=url %>"/>
						<jsp:param name="number_game" value="<%=k %>"/>
					</jsp:include>
				</li>
       		 </ul>      
       		 <div class="clear"></div>
		</div>
	</div>
	<div class="r">
			<%@ include file='/element/search.jsp'%>
			
			<div class="bol">
				<jsp:include page="adv/adv2.jsp"></jsp:include> 
			</div>
			<div class="bol">
				<jsp:include page="adv/adv2.jsp"></jsp:include> 
			</div>
		</div>
	</div>          	

 <jsp:include page="layout/footer.jsp"></jsp:include>           